﻿using Abp.Application.Services.Dto;
using AppFramework.ApiClient;
using AppFramework.DinosaursParkMes.Execute.Dto;
using AppFramework.DinosaursParkMes.Product;
using AppFramework.DinosaursParkMes.Product.DTO;
using AppFramework.DinosaursParkMes.Production.DTO;
using AppFramework.DinosaursParkMes.UniqueIdCode.Dto;
using AppFramework.Dto;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace AppFramework.DinosaursParkMes.UniqueIdCode
{
    public class UniqueIdCodeAppService : ProxyAppServiceBase, IUniqueIdCodeAppService
    {
        public UniqueIdCodeAppService(AbpApiClient apiClient) : base(apiClient)
        {
            this.ApiClient = apiClient;
        }

        public async Task<ListResultDto<BarcodeStandardlist>> BarcodeStandard()
        {
            return await ApiClient.GetAsync<ListResultDto<BarcodeStandardlist>>(GetEndpoint(nameof(BarcodeStandard)));
        }

        public async Task<List<Barcodetypelist>> GetBarcodetype()
        {
            return await ApiClient.GetAsync<List<Barcodetypelist>>(GetEndpoint(nameof(GetBarcodetype)));
        }

        public async Task<ListResultDto<ShowUniqueIdCodeDto>> GetUniqueIdCode()
        {
            return await ApiClient.GetAsync<ListResultDto<ShowUniqueIdCodeDto>>(GetEndpoint(nameof(GetUniqueIdCode)));
        }

        public async Task<UniqueIdCodeAddDTO> UniqueIdCodeAdd(UniqueIdCodeAddDTO dto)
        {
            await ApiClient.PostAsync(GetEndpoint(nameof(UniqueIdCodeAdd)), dto);
            return dto;
        }


    }
}
